#include "ros/ros.h"
#include "plumbing_pub_sub/Person.h"

void doPerson(const plumbing_pub_sub::Person::ConstPtr &person)
{
    ROS_INFO("Name:%s, %d, %.2f", person->name.c_str(), person->age, person->height);
}


int main(int argc, char *argv[])
{
    setlocale(LC_ALL, "");
    ROS_INFO( "start subscriber!" ); 
    ros::init( argc, argv, "sub_person");
    ros::NodeHandle n;
    ros::Subscriber sub = n.subscribe("liaotian", 10, doPerson);
    ros::spin();
}